package com.gm.wholesale.module.main.presenter;


import android.os.Handler;
import android.os.Message;

import androidx.annotation.NonNull;

import com.gm.commonlib.views.popupwindow.Popupwindow;
import com.gm.wholesale.module.main.ui.MainActivity;
import com.gm.wholesale.module.order.view.VoiceInputView;


public class VoiceViewPresenter {
    public VoiceInputView mVoiceInputView;
    MainActivity activity;
    public void showView(MainActivity mActivity) {
        this.activity = mActivity;
        if (mVoiceInputView == null) {
            mVoiceInputView = new VoiceInputView(mActivity);
        }
        mVoiceInputView.reset();
        handler.sendEmptyMessageDelayed(1, 400);
    }

    Handler handler = new Handler() {
        @Override
        public void handleMessage(@NonNull Message msg) {
            Popupwindow.showPopCenterView(activity, mVoiceInputView);
            mVoiceInputView.startVoice();
        }
    };



}
